package com.example.demo.niuke;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

/**
 * @Author: liull
 * @Description:将一个字符中所有出现的数字前后加上符号“*”，其他字符保持不变 public static String MarkNum(String pInStr)
 * {
 * return null;
 * }
 * @Date: Created in 8:58 2020/3/25
 * @Modified By:
 */
public class Main31 {
    public static void main(String[] args) throws IOException {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        String line;
        while ((line = br.readLine()) != null) {
            System.out.println(markNums(line));
        }
    }

    public static String markNum(String pInStr) {
        String[] strArr = pInStr.split("");
        StringBuilder sb = new StringBuilder();
        for (int i = 0; i < strArr.length; i++) {
            if ('0' <= strArr[i].charAt(0) && strArr[i].charAt(0) <= '9') {

            } else {
                sb.append(strArr[i]);
            }
        }
        return sb.toString();
    }

    /**
     * 求数字子串
     *
     * @param pInStr
     * @return
     */
    //    public static String subStr(String pInStr) {
    //        String[] strArr = pInStr.split("");
    //        for (int i = 1; i <= pInStr.length(); i++) {
    //            for (int j = 0; j < pInStr.length(); j++) {
    //                strArr[j]>strArr[j+i]
    //            }
    //
    //        }
    //        return null;
    //    }
    public static String markNums(String pInStr) {

        StringBuilder result = new StringBuilder();
        boolean insideNumber = false;

        for (int i = 0; i < pInStr.length(); i++) {
            char ch = pInStr.charAt(i);

            if (Character.isDigit(ch)) {
                if (!insideNumber) {
                    result.append('*');
                    insideNumber = true;
                }
                result.append(ch);
            } else {
                if (insideNumber) {
                    result.append('*');
                    insideNumber = false;
                }
                result.append(ch);
            }
        }

        if (insideNumber) {
            result.append('*');
        }

        return result.toString();
    }

}
